package com.forlove.app.qselect.answer.widght.indicator;

import android.os.Parcel;
import android.os.Parcelable;
import android.view.View;

/**
 * Created by yjl on 2017/12/4.
 */

class SavedState extends View.BaseSavedState {
    int mCurrentPage;

    public SavedState(Parcelable superState) {
        super(superState);
    }

    private SavedState(Parcel in) {
        super(in);
        mCurrentPage = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeInt(mCurrentPage);
    }

    public static final Creator<SavedState> CREATOR = new Creator<SavedState>() {
        @Override
        public SavedState createFromParcel(Parcel in) {
            return new SavedState(in);
        }

        @Override
        public SavedState[] newArray(int size) {
            return new SavedState[size];
        }
    };
}
